package com.chigga.admin.domain.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema(description = "admin 测试实体信息")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AdminDO {
    @Schema(name = "id", description = "主键", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1024")
    @NotNull(message = "id 不能为空")
    private String id;

    @Schema(name = "name", description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "defchigga")
    @NotBlank(message = "name 不能为空")
    @Size(min = 1, max = 30, message = "name 长度必须在 2 - 30 之间")
    private String name;
}
